package com.label.manager.service.impl;

import com.label.manager.domain.Project;
import com.label.manager.mapper.ProjectMapper;
import com.label.manager.service.IProjectService;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

@Service
public class ProjectServiceImpl implements IProjectService {

    @Autowired(required=false)
    private ProjectMapper projectMapper;

    @Override
    public List<Project> selectProjectList(Project project) {
        return projectMapper.selectProjectList(project);
    }

    @Override
    public Project selectProjectById(Long projectId) {
        return projectMapper.selectProjectById(projectId);
    }

    @Override
    public int deleteProjectById(Long projectId) {
        return projectMapper.deleteProjectById(projectId);
    }

    @Override
    public int insertProject(Project project) {
        return projectMapper.insertProject(project);
    }

    @Override
    public int updateProject(Project project) {
        return projectMapper.updateProject(project);
    }

    @Override
    public int closeProject(Long projectId) {
        return projectMapper.closeProject(projectId);
    }

}
